import os
import json
from common.utils import empty


def read_json(path, default_value=''):
    if not os.path.isfile(path):
        return default_value
    with open(path) as file:
        content = file.read()
        if empty(content):
            return default_value
        results = json.loads(content)
        return results
        pass
    pass
